package cn.besbing.server.service.primary;


import cn.besbing.model.entities.primary.RejectProcessDetail;
import cn.besbing.model.entities.primary.RejectProcessDetailExample;
import cn.besbing.model.mapper.primary.RejectProcessDetailMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RejectProcessDetailServiceImpl implements RejectProcessDetailMapper {

    @Autowired(required = false)
    private RejectProcessDetailMapper detailMapper;


    @Override
    public long countByExample(RejectProcessDetailExample example) {
        return countByExample(example);
    }

    @Override
    public int deleteByExample(RejectProcessDetailExample example) {
        return deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(String pkProcessDetail) {
        return deleteByPrimaryKey(pkProcessDetail);
    }

    @Override
    public int insert(RejectProcessDetail record) {
        return detailMapper.insert(record);
    }

    @Override
    public int insertSelective(RejectProcessDetail record) {
        return insertSelective(record);
    }

    @Override
    public List<RejectProcessDetail> selectByExample(RejectProcessDetailExample example) {
        return selectByExample(example);
    }

    @Override
    public RejectProcessDetail selectByPrimaryKey(String pkProcessDetail) {
        return selectByPrimaryKey(pkProcessDetail);
    }

    @Override
    public int updateByExampleSelective(RejectProcessDetail record, RejectProcessDetailExample example) {
        return updateByExampleSelective(record, example);
    }

    @Override
    public int updateByExample(RejectProcessDetail record, RejectProcessDetailExample example) {
        return updateByExample(record, example);
    }

    @Override
    public int updateByPrimaryKeySelective(RejectProcessDetail record) {
        return detailMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(RejectProcessDetail record) {
        return updateByPrimaryKey(record);
    }

    public List<RejectProcessDetail> selectRecordByBillno(String taskId) {
        RejectProcessDetailExample detailExample = new RejectProcessDetailExample();
        RejectProcessDetailExample.Criteria criteria = detailExample.createCriteria();
        criteria.andBillnoEqualTo(taskId);
        return detailMapper.selectByExample(detailExample);
    }
}
